<template>
	<view>
		<view class="titleBox">
			{{title}}
		</view>
		<view class="main" v-html="content" style="font-size: 28rpx;">
			
		</view>
	</view>
</template>

<script>
	import Require from '../../common/require.js';
	export default {
		data() {
			return {
				title:'',
				content:''
			};
		},
		onLoad(option) {
			var self=this;
			self.title=option.title;
			Require.commonRequest({
				url: '/api/question/detail',
				data:{
					id:option.id,
				},
				success: function(ret) {
					if (ret.data.code == 200)
						self.content=ret.data.data.article_content
				},
				fail: function() {
					uni.showToast({
						icon: "none",
						title: "网络异常，请稍后再试"
					})
				}
			})
		}
	}
</script>

<style lang="scss">
   .titleBox{
	   width: 750rpx;
	   height: 100rpx;
	   background-color: #FFFFFF;
	   color: #333333;
	   font-size: 32rpx;
	   display: flex;
	   align-items: center;
	   justify-content: center;
	   margin-top: 10rpx;
   }
   .main{
	   width: 680rpx;
	   margin-top: 20rpx;
	   margin-left: 35rpx;
   }
</style>
